// Learn cc.Class:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html
// Learn Attribute:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/reference/attributes/index.html
// Learn life-cycle callbacks:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/life-cycle-callbacks.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/life-cycle-callbacks/index.html

cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //     // ATTRIBUTES:
        //     default: null,        // The default value will be used only when the component attaching
        //                           // to a node for the first time
        //     type: cc.SpriteFrame, // optional, default is typeof default
        //     serializable: true,   // optional, default is true
        // },
        // bar: {
        //     get () {
        //         return this._bar;
        //     },
        //     set (value) {
        //         this._bar = value;
        //     }
        // },
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
         if (Global.scalex < 1){
            this.node.getChildByName("Image_3").setScale(Global.scalex);
            this.node.getChildByName("center_btn_panel").setScale(Global.scalex);
            this.node.getChildByName("Image_6").setScale(Global.scalex);
        }
        else if (Global.scalex > 1) {
            this.node.getChildByName("back").setScale(Global.scalex);
        }
    },

    start () {

    },

    // update (dt) {},
    testConnect() {
        var lsMgr = this.getComponent('LoginServerMgr');
        cc.log(lsMgr);
        lsMgr.connect();
    },

    shopEntry() {
    },

    freeGoodEntry() {
    },

    rankEntry() {
        var node = cc.find("rank_widget");
        node.active = true;
    },

    historyEntry() {
    },

    ruleEntry() {
    },

    settingEntry() {
    },

    feedbackEntry() {
    },

    adEntry() {
    },

    bijiEntry() {
        cc.director.loadScene("scenejisubiji");
    },

    niuniuEntry() {
    },

    creatEntry() {
    },

    joinEntry() {
    },

    otherGameEntry() {
    },

});
